package com.itheima.dubbo.api.mongo;


import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {

    //发布朋友圈
    void save(Movement movement);

    //据用户id查询当前用户的动态
    PageResult findByUserId(Long userId, Integer page, Integer pagesize);

    //查询好友动态
    PageResult findFriendMovements(Integer page, Integer pagesize, Long userId);

    //随机查询动态的数据
    List<Movement> randomMovements(Integer pagesize);

    //根据pid批量查询
    List<Movement> findByPids(List<Long> pidList);

    //根据id查询动态
    Movement findById(String movementId);

    //更新朋友圈的状态
    void updateMovement(String movementId, int state);
}